package cn.com.homeyoda.aimate.aihealth.ui.home;

import android.annotation.SuppressLint;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import cn.com.homeyoda.aimate.aihealth.R;
import cn.com.homeyoda.aimate.aihealth.bean.ArticleBean;
import cn.com.homeyoda.aimate.aihealth.bean.ZuiXinBean;

import java.util.List;

/**
 * Created By 刘纯贵
 * Created Time 2020/4/30
 */
public class ZuiXinAdapter extends BaseQuickAdapter<ZuiXinBean, BaseViewHolder> {


    public ZuiXinAdapter(int layoutResId, @Nullable List<ZuiXinBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, ZuiXinBean item) {
//        helper.setText(R.id.zx_btn,item.getTitle());
//        helper.setText(R.id.zx_text,item.getContent());
//        helper.setText(R.id.zx_time,item.getTime());
//        helper.setTextColor(R.id.zx_text,R.color.colorPrimary);
    }

    @Override
    public void onBindViewHolder(BaseViewHolder holder, int position) {
        super.onBindViewHolder(holder, position);
        holder.setText(R.id.zx_btn,getData().get(position).getTitle());
        holder.setText(R.id.zx_text,getData().get(position).getContent());
        holder.setText(R.id.zx_time,getData().get(position).getTime());
        holder.addOnClickListener(R.id.zx_btn);

    }



    @Override
    public void setNewData(@Nullable List<ZuiXinBean> data) {
        super.setNewData(data);
    }
}
